//存token到cookies
import Cookies from "js-cookie";

const TOKEN = 'hrsaas-token'

export function getToken(){
  return Cookies.get(TOKEN)
}

export function setToken(token){
  return Cookies.set(TOKEN,token)
}

export function removeToken(){
  return Cookies.remove(TOKEN)
}

//存获取到token时的时间戳
const TOKEN_TIME = 'token-time'

export function setTimeStamp(){
  Cookies.set(TOKEN_TIME, Date.now())
}

export function getTimeStamp(){
  return Cookies.get(TOKEN_TIME)
}

export function removeTimeStamp(){
  Cookies.remove(TOKEN_TIME)
}